package com.devshephard.designModel.facemodel;

import com.devshephard.designModel.facemodel.annotation.DoDoor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class Test2Controller {

    @DoDoor(key = "userId", returnJson = "{\"code\":\"1111\",\"info\":\"⾮⽩名单 可访问⽤户拦截！\"}")
    @RequestMapping(path = "/api/queryUserInfo2", method = RequestMethod.GET)
    @ResponseBody
    public String queryUserInfo(@RequestParam String userId) {
        return userId + "拦截执行返回字符串";
    }

}
